<template>
  <div class="map" ref="mapRef">
    
  </div>
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue'
const mapRef = ref()

onMounted(() => {
  var map = new window.BMapGL.Map(mapRef.value); // 创建Map实例
  map.centerAndZoom('成都市', 12); // 初始化地图,设置中心点坐标和地图级别
  map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
})
</script>

<style lang="scss" scoped>
.map {
  width: 100%;
  height: 100vh;
}
</style>
